package com.feicheng.iou.service;

import com.feicheng.iou.entity.Resource;
import com.baomidou.mybatisplus.extension.service.IService;
import com.feicheng.iou.pojo.resourcePublicSeaPOJO.ResourcePublicSeaParamPOJO;
import com.feicheng.iou.result.ResultInfo;
import com.feicheng.iou.pojo.ResourcePOJO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author tianchunlei
 * @since 2021-06-28
 */
public interface ResourceService extends IService<Resource> {


    /**
     * @param studentId
     * @return Resource
     * @Author wuweinan
     * @Description 查询线索信息, 用于个人详情
     * @Date 2021-6-29 17:37
     */
    Resource selectResourceByStudentIdPersonalDetail(Integer studentId);

    /**
     * @param studentId
     * @return ResultInfo
     * @Author wuweinan
     * @Description 查询线索信息, 用于声明周期
     * @Date 2021-6-29 17:37
     */
    ResultInfo selectResourceByStudentIdLifeCycle(Integer studentId);

    /**
     * @param resourcePublicSeaParamPOJO
     * @return List<ResourcePublicSeaReturnListPOJO>
     * @Author wuweinan
     * @Description 查询公海线索信息
     * @Date 2021-6-29 17:37
     */
    ResultInfo selectPublicSea(ResourcePublicSeaParamPOJO resourcePublicSeaParamPOJO);


    // 线索添加的接口
    ResultInfo insert(ResourcePOJO resourcePOJO);

    // 线索修改的接口

    ResultInfo update(ResourcePOJO resourcePOJO);

    // 线索查询所有的接口
    ResultInfo listAll(ResourcePOJO resourcePOJO, HttpServletRequest request);

    // 线索查询单个info的接口
    ResultInfo selectinfo(Integer id);

    // 线索删除的接口
    ResultInfo delete(ResourcePOJO resourcePOJO);

    // 线索分配接口
    ResultInfo updateAutor(ResourcePOJO resourcePOJO);

    // 放弃线索接口
    ResultInfo abandonResource(ResourcePOJO resourcePOJO);

    //线索查重
    ResultInfo selectResourceByName(String name);

    //解析线索查询的结果并封装excelmodel，同时存储至session
    void excelOut(HttpServletResponse response) throws IOException;

    //转线索接口
    ResultInfo transferRessource(ResourcePOJO resourcePOJO);

}
